<?php echo $this->Session->flash(); ?>
<table id="tabla" class="tabla" width="100%">
    <thead>
        <tr>
            <th>Username</th>
            <th>Name</th>
            <th>Primer apellido</th>
            <th>Regional</th>
            <th>Email</th>
            <th>Typ </th>
            <th colspan="2"></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($User as $usuario): ?>
            <tr>
                <td><?php echo $usuario['User']['username'] ?> </td>
                <td><?php echo $usuario['User']['nombre'] ?></td>
                <td><?php echo $usuario['User']['primer_apellido'] ?></td>
                <td><?php echo $usuario['Branch']['nombre'] ?></td>
                <td><?php echo $usuario['User']['email'] ?></td>
                <td><?php echo $usuario['Group']['name'] ?></td>
                <td><?php echo $this->Ajax->link("Bearbeiten", array('controller' => "Users", "action" => "edit", $usuario['User']['id']), array('update' => 'content')) ?></td>
                <td><?php echo $this->Ajax->link("Löschen", array('controller' => "Users", "action" => "delete", $usuario['User']['id']), array('update' => 'content'), '¿Esta seguro de eliminar el usuario? ') ?></td>
            </tr>
        <?php endforeach; ?>
    </tbody>
</table>
<?php
echo "<br>";
echo $this->Html->link("salir", array('model' => 'User', "action" => "logout"))
?>
